package org.fuxia.im.listeners;

import org.fuxia.im.common.ClientConst;
import org.fuxia.im.common.ClientContext;
import org.fuxia.im.core.entries.ECResponse;
import org.fuxia.im.gui.Main;

/**
 * 删除好友结果处理类
 *
 */
public class DelUserListener extends CommonListener {

	@Override
	public void trigger(Object param) {
		super.trigger(param);
		ECResponse resp = (ECResponse) param ;
		if(resp.getStatusCode()==null) {
			String groupKey = resp.get("groupKey").toString() ;
			String friendUserCode = resp.get("friendUserCode").toString() ;
			ClientContext.delUserInGroup( groupKey,friendUserCode);
			ClientContext.getValue(ClientConst.MAIN_WINDOW, Main.class).updateFriendList();
		}
	}
}
